package com.isoft.farm.entity;

public class ImageVO {
    private Integer error;//1  成功   0 失败
    private String url;// 图片的路径

    public ImageVO(Integer error, String url) {
        this.error = error;
        this.url = url;
    }

    public ImageVO() {  }

    public static ImageVO fail() {
        return  new ImageVO(0,null);
    }

    public static ImageVO success(String realUrl) {
        return  new ImageVO(1,realUrl);
    }


    public Integer getError() {
        return error;
    }

    public void setError(Integer error) {
        this.error = error;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }


    @Override
    public String toString() {
        return "ImageVO{" +
                "error=" + error +
                ", url='" + url + '\'' +
                '}';
    }
}
